#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int my_strlen(char* string)
{
	int i = 0;
	while (*string != '\0')
	{
		i++;
		string++;
	}
	return i;
}

void reverse_string(char* string)
{
	int len = my_strlen(string);
	static int i = 1;
	while (string <= string + len - i)
	{
		char temp = *string;
		*string = *(string + len - i);
		*(string + len - i) = temp;
		i++;
		reverse_string(++string);
	}
}

int main()
{
	char arr[] = "abcdef";
	reverse_string(arr);
	printf("%s", arr);
	return 0;
}